import UIKit
import MYModule

open class HUD: ViewController {
    
    fileprivate var indicatorView = UIActivityIndicatorView()
    
   
    public init() {
        super.init(nibName: nil, bundle: nil)
        
        definesPresentationContext = true
        modalPresentationStyle = .overCurrentContext
        modalTransitionStyle = .crossDissolve
        view.backgroundColor = UIColor.black.withAlphaComponent(0.05)
        
    }
    
    required public init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
   
    open override func viewDidLoad() {
        super.viewDidLoad()
        
    }
    
    open override func makeUI() {
        super.makeUI()
        
        indicatorView.style = .whiteLarge
        indicatorView.color = .white
        indicatorView.backgroundColor = UIColor.assist_222222
        indicatorView.startAnimating()
        indicatorView.layer.cornerRadius = 10.0
        
        view.addSubview(indicatorView)
        
        indicatorView.snp.makeConstraints { make in
            make.center.equalToSuperview()
            make.size.equalTo(100)
        }
        
       
        
    }
    
    open override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        
        indicatorView.startAnimating()
    }
    
    
    
    
}
